package pojo.cat;

import pojo.Tgoods;

public class ShowGood {
    private Tgoods tgoods;
    private int num;
    private double price;

    public Tgoods getTgoods() {
        return tgoods;
    }

    public void setTgoods(Tgoods tgoods) {
        this.tgoods = tgoods;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
        this.price = this.tgoods.getPrice() * this.num;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public ShowGood() {
    }

    public ShowGood(Tgoods tgoods, int num, double price) {
        this.tgoods = tgoods;
        this.num = num;
        this.price = price;
    }
}
